export function PublicRouter(Router) {
	
	Router.prototype.routerBack = function (path) {
		if (path) {
			if (/^http/.test(path)) {
				location.href = path;
			} else {
				const { route } = this.resolve(path, this.currentRoute, true);
				this.push(route.fullPath);
			}
		} else if (history.length > 1) {
			this.back();
		} else {
			this.push('/');
		}
	};
	
}
